package com.cs.cstest.controls;

import java.util.Date;

import javax.annotation.Resource;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cs.cstest.mapper.m1.DataMapper;
import com.cs.cstest.mapper.newdb.NewDataMapper;
import com.cs.redis.utils.RedisUtil;

@RestController
@EnableAutoConfiguration
public class ExampleControl {
	
    //@Value("${testprofile}")
    private String name;
    
    @Resource(name="testUtil")
    private RedisUtil redisutil;
    
    @Resource(name="redis1Util")
    private RedisUtil redisutil1;
    
    @Resource
    private NewDataMapper scanDataDiffMapper;

    @Resource
    private DataMapper scandataMapper;

    @RequestMapping("/")
    String home() {
    	redisutil.set("test", "test");
    	redisutil1.set("test1", "test1");
    	
    	System.out.println(scanDataDiffMapper.getcount());
    	System.out.println(scandataMapper.getcount());
        return "Hello World!"+name;
    }
}